package top.kuxiao.crmserver.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import top.kuxiao.crmserver.pojo.AccountManager;
import top.kuxiao.crmserver.service.IAccountManagerService;
import top.kuxiao.crmserver.utils.Auth;
import top.kuxiao.crmserver.utils.ResultUtil;

import java.util.List;

/**
 * <p>
 * 客户经理 前端控制器
 * </p>
 *
 * @author kuxiao
 * @since 2022-01-12
 */
@Api(tags ="客户经理")
@CrossOrigin
@RestController
@RequestMapping("/account-manager")
public class AccountManagerController {



    @Autowired
    IAccountManagerService accountManagerService;

    /**
     * 查询客户经理
     * */
    @Auth("SE,AM")
    @ApiOperation( value = "查询客户经理")
    @RequestMapping(value = "amList", method = RequestMethod.POST)
    public ResultUtil amList(){
        List<AccountManager> list = accountManagerService.list();
        return ResultUtil.resObj(list);
    }

}
